<?php
/**
 * communit.as
 * @copyright (C)2008 Jaybill McCarthy, All Rights Reserved.
 * @category communitas
 * @package communitas
 * @author Jaybill McCarthy
 * @link http://communit.as communit.as
 * @license http://communit.as/docs/license License
 */

/**
 *
 * @package communitas
 * @subpackage forum_models
 * @license http://communit.as/docs/license License 
 */
 
class TopicviewsIndex extends Cts_Db_Table_Abstract
{
    protected $_name 	= 'vw_forum_topicviews_index';
    protected $_primary = 'id';
    
    function getCount($id){
    	$row = $this->fetchRow('id = '.$id);
    	if(!is_null($row)){
    		return (int)$row->views;
    	} else {
    		return null;
    	}
    }
    
}